package com.zl.tby.core.base.bean;

/**
 * @author changpeng
 * @version 1.0
 * @since 2024/8/6 22:31
 */
public class TbyBaseQuery {
    /**当前页*/
    private Integer current;
    /**获取数量*/
    private Integer size;
    /**排序属性*/
    private String order;

    /**获取开始位置*/
    public int getOffset() {
        return this.getCurrent() > 0 ? (this.getCurrent() - 1) * this.getSize() : 0;
    }

    public Integer getCurrent() {
        return current;
    }

    public void setCurrent(Integer current) {
        this.current = current;
    }

    public Integer getSize() {
        return size;
    }

    public void setSize(Integer size) {
        this.size = size;
    }

    public String getOrder() {
        return order;
    }

    public void setOrder(String order) {
        this.order = order;
    }
}
